cmake_minimum_required(VERSION 2.8.3)
project(neuvition_driver)
# add_definitions(-std=c++14)
set(CMAKE_CXX_STANDARD 14)

# include(./install/conanbuildinfo.cmake)
# conan_basic_setup()



find_package(catkin REQUIRED COMPONENTS
        roscpp
        rospy
        cv_bridge
        image_transport
        nodelet
        dynamic_reconfigure
        message_generation
        tf
        pcl_conversions
        pcl_ros
        std_msgs
        sensor_msgs
)

find_package(OpenCV 4 REQUIRED)




add_message_files(
  FILES
  test.msg
  # Message2.msg
)

generate_messages(
 DEPENDENCIES
 geometry_msgs
)

FIND_PACKAGE( OpenMP REQUIRED)
if(OPENMP_FOUND)
message("OPENMP FOUND")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
endif()

# This driver uses Boost::thread
#find_package(Boost REQUIRED COMPONENTS thread)
# This driver uses PCL
find_package(PCL REQUIRED)

add_compile_options(-std=c++11 -O3)
add_compile_options(-mcmodel=medium)
# libneuvsdk

find_package(OpenCV REQUIRED imgcodecs)

#${Boost_INCLUDE_DIRS}
include_directories(include  ${PCL_INCLUDE_DIRS} ${catkin_INCLUDE_DIRS})

# Generate dynamic_reconfigure server
generate_dynamic_reconfigure_options(cfg/NeuvitionNode.cfg)

# objects needed by other ROS packages that depend on this one
catkin_package(CATKIN_DEPENDS message_runtime ${${PROJECT_NAME}_CATKIN_DEPS} INCLUDE_DIRS include  )

# compile the driver and input library
add_subdirectory(src)

install(DIRECTORY include/
        DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION})
install(FILES nodelet_neuvition.xml
        DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})
install(DIRECTORY launch/
        DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/launch)
install(DIRECTORY params/
        DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/params)





